<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
	<button @click="hello()">点我给App发消息</button>
  </div>
</template>

<script>
import pubsub from 'pubsub-js'
export default {
  name: 'Student',
  props: {
    msg: String
  },
  methods:{
	  hello(){
		  //this.$bus.$emit('sendMsgToApp',this.msg)
		  pubsub.publish('hello',666)
	  }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
	
</style>
